<div class="form-group" <?php if($att['active'] == 0) { echo 'style="display:none;"'; } ?>>
	<label for="<?php echo $att['title']; ?>"><?php echo $att['title']; ?></label>
	<?php 
	if($att['effect'] == 0)
	{ echo $shop->CurrentProduct->getAttributeValue($att['id']); }
	else
	{
		if($att['type'] == 1)
		{
			echo '<select onchange="valuesChanged()" class="form-control" name="a_'.$att['id'].'_v" ';
			//onchange="setAttributeValue('.$att['id'].', this.value);"
			echo ' >';
			foreach($shop->getProductAttribute($att['id'])->getValues() as $val)
			{
				$vr = $shop->CurrentProduct->getVariationByAttributeValueId($att['id'], $val->getId());
				if(($val->getActive()) && ($vr->getActive()) && (($shop->getProductAttribute($att['id'])->getDisplayAll()) || is_object($vr)))
				{		
					$selected = '';
					if($_POST['a_'.$att['id'].'_v'] > 0)
					{
						if($_POST['a_'.$att['id'].'_v'] == $val->getId())
						{ $selected = 'selected="selected"'; }
					}
					else
					{
						if($val->getId() == $shop->CurrentProduct->Variations[$shop->CurrentProduct->getCurrentVariationId()]->getAttributeValueId($att['id']))
						{ $selected = 'selected="selected"'; }
					}
					
					?>
					<option value="<?php echo $val->getId(); ?>" <?php echo $selected; ?>>
						<?php echo $val->getValue(); ?>
						<?php 
						if($val->getValuePrice() > 0)
						{  echo '&nbsp;(+&nbsp;'.$val->getValuePrice($shop->getSetting('tax_included_prices'), 2).' kr.)'; }
						?>
					</option>
					<?php 
				}
			}
			echo '</select>';
		}
	}
	?>
</div>